Insulin is secreted by the pancreas in a highly controlled fashion to maintain the plasma glucose concentration within a narrow physiological range. In type 1 diabetes, insulin is administered exogenously to mimic the basal and postprandial insulin needs. The standard therapy is based on multiple insulin injections using a combination of short and long acting insulin analogues supported by blood glucose self-monitoring. Treatment by the continuous subcutaneous insulin infusion (CSII), i.e. using insulin pumps, is on the rise.
Continuous glucose monitoring promises to improve glucose control in subjects with diabetes (D. C. Klonoff. Continuous Glucose Monitoring: Roadmap for 21st century diabetes therapy. Diabetes Care 28 (5):1231-1239, 2005). New minimally invasive and non-invasive techniques are being developed; see examples such as U.S. Pat. No. 5,086,229 and U.S. Pat. No. 5,497,772.
Supporting the development of new minimally invasive and non-invasive measurement techniques, a range of mathematical methods has been proposed to aid data processing. Data processing is confounded by measurements of the glucose sensor being normally carried out in a fluid distinct from plasma, such as in the interstitial, dermal, or tear fluid. The kinetics properties of the transfer between plasma and the measurement fluid result in a delay between plasma and the measurement fluid (K. Rebrin, G. M. Steil, W. P. Van Antwerp, and J. J. Mastrototaro. Subcutaneous glucose predicts plasma glucose independent of insulin: implications for continuous monitoring. American Journal of Physiology-Endocrinology and Metabolism 277 (3):E561-E571, 1999). Thus, the ratio between the plasma glucose and the glucose in the measurement fluid changes with time and appropriate techniques are required to calculate an estimate of plasma glucose from sensor measurements apart from filtering out the measurement error.
The extended (linearised) Kalman filter has been proposed as a suitable computational vehicle for data processing of glucose sensor signal, see U.S. Pat. No. 6,575,905, U.S. Pat. No. 6,572,545, WO02/24065 and E. J. Knobbe and B. Buckingham. “The extended Kalman filter for continuous glucose monitoring” (Diabetes Technol. Ther. 7 (1):15-27, 2005). Process noise is an integral component of the Kalman filter. The process noise represents the random disturbance which is not captured by the other model components and is distinct from the measurement error, which describes the random component of the measurement process. The characteristics of the process noise are usually obtained from retrospective analysis of experimental data. However, the characteristics and specifically the variance of the process noise may be subject to temporal variations due to physiological or life-style factors excluded from modelling. For example, following meal ingestion, the process noise will have considerably higher variance compared to that applicable to fasting conditions. The standard Kalman filter is unable to accommodate and correct for such temporal variations because it uses fixed values for the process noise.
There are other known methods for monitoring glucose levels, for example WO97/28787 uses an adaptive mathematic model and U.S. Pat. No. 5,497,772 uses an enzymatic sensor to sense glucose levels.
The advancements in the field of continuous glucose sensors have stimulated the development of closed-loop systems based on combination of a continuous monitor, a control algorithm, and an insulin pump (R. Hovorka. Continuous glucose monitoring and closed-loop systems. Diabet. Med. 23 (1):1-12, 2006). This is denoted as an artificial pancreas. The original concept was introduced in late 70's, see U.S. Pat. No. 4,055,175 and U.S. Pat. No. 4,464,170, for example.
A wide spectrum of control algorithms has been proposed to titrate insulin in a closed-loop fashion, see a review by Parker et al (R. S. Parker, F. J. Doyle, III, and N. A. Peppas. The intravenous route to blood glucose control. IEEE Eng. Med. Biol. Mag. 20 (1):65-73, 2001). Two main categories have been employed, classical feedback control embodied in the proportional-integral-derivative (PID) controller (G. M. Steil, K. Rebrin, C. Darwin, F. Hariri, and M. F. Saad. Feasibility of automating insulin delivery for the treatment of type 1 diabetes. Diabetes 55 (12):3344-3350, 2006), and model predictive control (MPC) (R. Hovorka, V. Canonico, L. J. Chassin, U. Haueter, M. Massi-Benedetti, Federici M. Orsini, T. R. Pieber, H. C. Schaller, L. Schaupp, T. Vering, and M. E. Wilinska. Nonlinear model predictive control of glucose concentration in subjects with type 1 diabetes. Physiol Meas. 25 (4):905-920, 2004).
The Kalman filter was also used as part of control algorithm for closed-loop glucose control (R. S. Parker, F. J. Doyle, III, and N. A. Peppas. A model-based algorithm for blood glucose control in type I diabetic patients. IEEE Trans. Biomed. Eng 46 (2):148-157, 1999). A linearised Kalman filter was also proposed, see U.S. Pat. No. 6,572,545. The Kalman filter or the extended Kalman filter (described above) provide computationally efficient means to track and predict glucose excursions and are used in combination with a physiologically-based glucoregulatory model represented by stochastic differential equations.
There are other known methods for controlling glucose levels, for example, US2003/0208113 describes a system for assisting a person to maintain blood glucose levels between predetermined limits and U.S. Pat. No. 4,055,175 describes glucose control using a model based on quadratic and biquadratic equations.
Statements of Invention
According to the invention there is provided a method of real time substance monitoring in a living human or animal, the method comprising:                inputting a time series of substance level measurements from a sensor, said substance level measurements being indicative of a inferred level of said substance in a part of said human or animal,        calculating a first estimate of said inferred substance level from said measured substance level using a first system model,        calculating a second estimate of said inferred substance level from said measured substance level using a second system model with said second system model being a variation of said first system model and        predicting a combined estimate of the inferred substance level based on a combination of the first and second estimates.        
By using multiple models, the method may be considered to use an interacting multiple model strategy, i.e. a strategy in which two or more models may be defined with each model being a variation of the system model. Thus, in other words, according to another aspect of the invention, there is provided a method of real time substance monitoring in a living human or animal, the method comprising: inputting a time series of substance level measurements from a sensor, said substance level measurements being indicative of a inferred level of said substance, defining a system model which estimates said inferred substance level from said measured substance level, and applying an interacting multiple model strategy to the system model to provide a combined estimate of the inferred substance level.
The combined estimate may be a combined estimate of the current inferred substance level or a combined estimate of a future inferred substance level.
Each variation of the model may have a different process noise. As explained previously, the process noise represents the random disturbance which is not captured by the other model components. For each model, an estimate of the inferred substance level and the process noise is calculated in a computationally efficient manner. The estimates for each model are combined to provide a combined estimate of the inferred substance level. When combining the estimates, each estimate is preferably weighted according to an associated mixing probability, i.e. a probability of the estimate representing the true value. In other words, if one model is the most likely, this model is given the highest weighting so that the combined estimate is based primarily on this model. If no one model is the most likely, the weightings may be adjusted accordingly to give a more balanced representation of each model in the overall estimate. Said mixing probability may be updated responsive to a difference between said predicted glucose level measurement of each respective said model and said glucose level measurement from said sensor.
As an alternative to defining the models to have different process noise, the multiple models defined by the interacting multiple model strategy may differ in certain model constants. As described in the prior art, the extended Kalman filter may be used for a model which is non-linear in a certain parameter. However, the extended Kalman filter approximates the solution and for highly non-linear models this may be a problem. Using the interacting multiple model strategy permits the definition of a number of models, each differing in the fixed level of the parameter causing non-linearity. These models run in parallel, with no approximations being necessary (albeit the models are confined to discrete levels of the non-linear parameter) and the most appropriate parameter level may be chosen.
The interacting multiple model (IMM) strategy has been introduced to allow computationally efficient tracking of a maneuvering target (E. Mazor, A. Averbuch, Y. Bar-Shalom, and J. Dayan. Interacting multiple model methods in target tracking: A survey. IEEE Transactions on Aerospace and Electronic Systems 34 (1):103-123, 1998). A maneuvering target is characterised by temporal variability in acceleration, where the acceleration is, in effect, the process noise.
Besides use in radar and GPS tracking, see for example U.S. Pat. No. 5,325,098, U.S. Pat. No. 7,079,991, and U.S. Pat. No. 6,876,925, in the biomedical field the IMM approach has been used to monitor kinetic parameters (D. S. Bayard and R. W. Jelliffe. A Bayesian approach to tracking patients having changing pharmacokinetic parameters. J. Pharmacokinet. Pharmacodyn. 31 (1):75-107, 2004) and the imaging field, see for example (P. Abolmaesumi and M. R. Sirouspour. An interacting multiple model probabilistic data association filter for cavity boundary extraction from ultrasound images. IEEE Trans. Med. Imaging 23 (6):772-784, 2004).
The present applicant has recognised that the IMM is well suited to handle the temporal variations of the process noise of substance monitoring, for example when using a Kalman filter described above.
The substance being monitored is preferably glucose and the model is a glucoregulatory model. For glucose monitoring, the inferred glucose level may be the plasma glucose concentration which is not directly measurable and the measured glucose level may be the interstitial glucose level. The glucose level may be measured intravenously, subcutaneously and/or intradermally.
The glucoregulatory model may comprise five sub-models, the sub-model of insulin absorption, the sub-model of insulin action, the sub-model of gut absorption, the sub-model of glucose kinetics, and the sub-model of interstitial glucose kinetics. Alternatively, the glucoregulatory model may consist of a sub-set of the five models, e.g. the sub-model of glucose kinetics and the sub-model of interstitial glucose kinetics which interact to predict the inferred glucose level, e.g. plasma glucose concentration, from the measured glucose level, e.g. glucose level in the interstitial fluid.
For glucose monitoring, the process noise may represent the change in the unexplained glucose influx. The interacting multiple model strategy may comprise defining for each variation of the model, a state vector comprising a set of variables each having an associated uncertainty. The set of variables may comprise variables representing glucose amounts in the accessible, non-accessible and/or interstitial compartments and a variable representing an unexplained change in glucose level.
Alternatively, the substance being monitored may be the depth of anaesthesia. More information on the control of anaesthesia and the appropriate models which may be used in the interacting multiple model strategy may be determined from EP 1278564 and related application EP 1725278 to Aspect Medical Systems Inc. Other references are D. A. Linkens and M. Mahfouf. “Generalized Predictive Control with Feedforward (Gpcf) for Multivariable Anesthesia.” International Journal Of Control 56 (5):1039-1057, 1992, M. Mahfouf and D. A. Linkens. “Non-linear generalized predictive control (NLGPC) applied to muscle relaxant anaesthesia.” International Journal Of Control 71 (2):239-257, 1998, M. M. Struys, E. P. Mortier, and Smet T. De. “Closed loops in anaesthesia.” Best. Pract. Res. Clin. Anaesthesiol. 20 (1):211-220, 2006 or V Sartori, P Schumacher, T Bouillon, M Luginbuehl and M Morari “On-line estimation of propofol pharmacodynamic parameters.” Annual International Conference of the IEEE Engineering in Medicine and Biology Society (2005), 1 74-7.
The method may comprise applying a Kalman filter. A Kalman filter has two distinct steps; a predict step which uses the state estimate from the previous timestep to produce an estimate of the state at the current timestep and an update step which comprises using measurements at the current timestep to refine the estimate from the predict step to arrive at a new, more accurate, state estimate for the current timestep. In other words, the method may comprise predicting the state estimate from the previous timestep to produce an estimate of the state at the current timestep and updating the estimate using measurements at the current timestep to refine the estimate from the predicting step to arrive at an updated state estimate for the current timestep. The covariance, i.e. a measure of the estimated accuracy of the state estimate, may be used when refining the estimate. The update step may also comprise updating the covariance.
The method may further comprise predicting an estimate for the mixing probability and updating the predicted estimate for the mixing probability based on measurements of the substance levels. The combined estimate preferably uses the updated mixing probability estimates.
The method may further comprise an interact step which links the various models. The interact step may comprise determining the mixing probability from the mode probability, i.e. the probability that the system model transitions from one variation model to another variation model.
According to another aspect of the invention there is a method of real time glucose monitoring in a living human or animal, the method comprising                inputting a time series of glucose level measurements from a glucose sensor;        constructing at least two state vectors each comprising a set of variables for a respective one of at least two glucose level models, said state vectors representing states of said at least two models, said state vectors also including a variable representing an uncertainty in a change in glucose level with time, each of said variables having an associated probability distribution;        predicting a value of a said glucose level using said probability distribution and said state vectors;        updating values of said state vectors responsive to a difference between a predicted glucose level measurement for each said model and a glucose level measurement from said sensor; and        determining a combined predicted glucose level measurement for said human or animal by combining outputs from said glucose level models according to a mixing probability representing a respective probability of each said model correctly predicting said glucose level; and        further comprising updating said mixing probability responsive to said predicted glucose level measurement of each respective said model and said glucose level measurement from said sensor.        
The method may further comprise using the value of a first of state vectors to modify a second of said state vectors to thereby represent a transition between said models.
According to another aspect there is provided a method of controlling a substance in a human or animal in real time, the method comprising                obtaining a combined estimate for the inferred substance level as previously described,        inputting a desired reference value for the inferred substance level        calculating, using said combined estimate, a dose to obtain said desired reference value and        applying said dose to a patient.        
According to another aspect there is provided a method for real time control of a substance in a human or animal, the apparatus comprising:                calculating a combined estimate using real time monitoring as described above, and        calculating a specified amount of medication as the amount of medication required to bring the combined estimate into line with a desired value and        delivering said specified amount of medication to a user.        
Additionally or alternatively, the calculation of the specified amount and/or does may be calculated using a method similar to that used for monitoring and the combined estimate may be calculated by any other method.
Thus, according to another aspect there is provided a method for real time control of a substance in a human or animal, the method comprising providing a time series of measurements of substance level, said measurements being indicative of an inferred level of said substance in a part of said human or animal, calculating an estimate of said inferred level, calculating a specified amount of medication to be the amount of medication required to bring the estimate of said inferred level in line with a desired value by calculating a first estimate of said specified amount of medication using a first system model, calculate a second estimate of said specified amount of medication using a second system model with said second system model being a variation of said first system model, calculating said specified amount of medication based on a combination of said estimates and delivering said specified amount of medication to a user. The method may further comprise calculating said estimate of said inferred level using real time monitoring as described above.
The substance being controlled may be glucose and the dose/medication applied may be insulin, glucagons or similar substances or a combined thereof. The substance being controlled may be the depth of anaesthesia glucose and the dose/medication applied may be anaesthesia.
According to another aspect of the invention, there is provided a method for controlling glucose in human or animal body, comprising calculating a combined estimate using real time monitoring as described above, and displaying a suggested insulin bolus to be applied on a user interface, wherein the suggested insulin bolus is calculated by the processor as the amount of medication required to bring the combined estimate into line with a desired glucose value. The method may comprise using the interacting multiple model strategy described above to calculate the insulin bolus to be applied.
According to another aspect there is provided apparatus for monitoring a substance in human or animal in real time, the apparatus comprising:                a sensor providing a time series of measurements of substance level, said measurements being indicative of an inferred level of said substance in a part of said human or animal and        a processor which is adapted to perform the following steps:        calculate a first estimate of said inferred substance level from said measured substance level using a first system model,        calculate a second estimate of said inferred substance level from said measured substance level using a second system model with said second system model being a variation of said first system model andpredicting a combined estimate of the inferred substance level based on a combination of the first and second estimates.        
By using multiple models, the method may be considered to use an interacting multiple model strategy, i.e. a strategy in which two or more models may be defined with each model being a variation of the system model. Thus, in other words, according to another aspect of the invention there is provided apparatus for monitoring a substance in human or animal in real time, the apparatus comprising:                a sensor providing a time series of measurements of said substance level, said measurements being indicative of an inferred level of said substance in a part of said human or animal and        a processor which applies an interacting multiple model strategy to a system model to provide a combined estimate of the inferred substance level from the substance level measurements.        
The substance being monitored is preferably glucose and the model is a glucoregulatory model. For glucose monitoring, the inferred glucose level may be the plasma glucose concentration which is not directly measurable and the measured glucose level may be the interstitial glucose level. The glucose level may be measured intravenously, subcutaneously and/or intradermally.
Alternatively, the substance being monitored may be the depth of anaesthesia.
The processor may be a state estimator and the interacting multiple model strategy may comprise defining for each variation of the model, a state vector comprising a set of variables each having an associated uncertainty. The set of variables may comprise variables representing glucose amounts in the accessible, non-accessible and/or interstitial compartments and a variable representing an unexplained change in glucose level.
The glucoregulatory model may comprise five sub-models, the sub-model of insulin absorption, the sub-model of insulin action, the sub-model of gut absorption, the sub-model of glucose kinetics, and the sub-model of interstitial glucose kinetics. Alternatively, the glucoregulatory model may consist of a sub-set of the five models, e.g. the sub-model of glucose kinetics and the sub-model of interstitial glucose kinetics.
The apparatus may further comprise a user monitor with an input/output interface to receive inputs from the user, e.g. meals and exercise information and to display the status of the apparatus.
The apparatus may further comprise a real-time alarm which is activated when the combined estimate is below a preset hypoglycaemia threshold or above a preset hyperglycaemia threshold.
According to another aspect there is provided apparatus for monitoring glucose in human or animal in real time, the apparatus comprising:                (an input or) a continuous glucose sensor providing an estimate of glucose level        an optimal state estimator based on the interacting multiple model strategy and adopting a stochastic model to provide optimal estimate of glucose level from data obtained by the continuous glucose sensor        
The interacting multiple model strategy may use a standard or extended Kalman filter.
The apparatus may comprise one or more additional glucose sensors providing independent estimates of glucose level. At least one sensor may measure glucose intravenously. At least one sensor may measure glucose subcutaneously. At least one sensor may measure glucose subcutaneously. At least one sensor may measure glucose intradermally.
The apparatus may further comprise a user monitor with an input/output interface to receive inputs from the user and to display the status of the apparatus.
The apparatus may further comprise a real-time alarm which is activated when the optimal glucose estimate is below a preset hypoglycaemia threshold or above a preset hyperglycaemia threshold.
The apparatus may use the interacting multiple model strategy to make a prediction of future glucose values and/or to indicate sensor failure when the estimate of the process noise exceeds a predefined value.
According to another aspect of the invention, there is provided apparatus for real time control of glucose in a human or animal, the apparatus comprising:                a glucose sensor providing a time series of measurements of glucose level, said measurements being indicative of plasma glucose concentration,        a processor which applies an interacting multiple model strategy to a glucoregulatory model to provide a combined estimate of the plasma glucose concentration from the measured glucose levels, and        a dispenser for delivering a specified amount of medication to a user in response to a command from the processor,        wherein the specified amount of medication is calculated by the processor as the amount of medication required to bring the combined estimate into line with a desired glucose value.        
The dispenser may deliver insulin or insulin and glucagon, or insulin and another glucose controlling substance.
According to another aspect of the invention, there is provided apparatus for controlling glucose in human or animal body, comprising                a glucose sensor providing a time series of measurements of glucose level, said measurements being indicative of plasma glucose concentration,        a processor which applies an interacting multiple model strategy to a glucoregulatory model to provide a combined estimate of the plasma glucose concentration from the measured glucose levels, and        a user interface for displaying a suggested insulin bolus to be applied        wherein the suggested insulin bolus is calculated by the processor as the amount of medication required to bring the combined estimate into line with a desired glucose value.        
The desired glucose value may vary with time to define a trajectory of desired or set-point values. The trajectory may be input to the processor by a user, e.g. via a user interface which accepts input from a user.
The processor may comprise a model combiner to generate a combined estimate for the plasma glucose concentration using the interacting multiple model strategy and may comprise a dose estimator which applies the interacting multiple model strategy to determine the amount of medication required.
According to another aspect of the invention, there is provided an apparatus for controlling a substance in human or animal in real time, the apparatus comprising:                an input to receive an estimate of the said substance        an input to receive past control commands        an input to receive the desired set point trajectory of the said substance        an interacting multiple model strategy providing optimal estimate of the said substance        an optimal dose estimator relating the control command to the time evolution of the said substance with the use of substantially the same interacting multiple model strategy        a dispenser, which delivers the amount of medication specified by the control command.        
The interacting multiple model strategy may use a standard or extended Kalman filter.
The substance being controlled is preferably glucose and the medication may be insulin or a combination of insulin and glucagons.
Alternatively, the substance being controlled may be the depth of anaesthesia and the medication may be anaesthesia.
The set point trajectory may be predefined, e.g. obtained from a health monitor which accepts input from a user.
According to another aspect of the invention, there is provided an artificial pancreas for controlling glucose levels in real time comprising:                a continuous glucose monitor providing an estimate of glucose level        an optimal state estimator based on the interacting multiple model strategy and adopting a stochastic physiological model of glucoregulation to provide optimal estimate of glucose level from data obtained by the continuous glucose monitor        a glucose controller utilising a substantially same stochastic model of glucoregulation as the optimal glucose estimator and a substantially same interacting multiple model strategy to determine a control command        a dispenser, which delivers the amount of medication specified by the control command        
The artificial pancreas may be a portable device. The dispenser may infuse insulin or a combination of insulin and glucagon. The dispenser may infuse medication intravenously or subcutaneously.
The artificial pancreas may comprise one or more additional glucose monitors providing independent estimates of glucose level. At least one monitor may measure glucose intravenously. At least one monitor may measure glucose subcutaneously.
The artificial pancreas may further comprise a user monitor with an input/output interface to receive inputs from the user and to display status of the artificial pancreas.
The interacting multiple model strategy may use a standard or extended Kalman filter.
The artificial pancreas may receive information about any or all of user triggered insulin boluses, meals, exercise and insulin infusion. This information may be utilised by the physiological model of glucoregulation.
According to another aspect of the invention there is provided a method for estimating retrospectively basal insulin infusion, carbohydrate-to-insulin ratio, and insulin sensitivity comprising the acts of:                receiving time-series of an estimate of glucose level        receiving time-series of administered insulin infusion and insulin boluses        providing the time-series to an interacting multiple model strategy, which adopts a stochastic physiological model of glucoregulation to provide optimal estimate basal insulin infusion, carbohydrate-to-insulin ratio, and insulin sensitivity        
According to another aspect of the invention there is provided a decision support system for suggesting in real time insulin bolus comprising:                a continuous glucose monitor providing an estimate of glucose level        an optimal state estimator based on the interacting multiple model strategy and adopting a stochastic physiological model of glucoregulation to provide optimal estimate of glucose level from data obtained by the continuous glucose monitor        a glucose controller utilising a substantially same stochastic model of glucoregulation as the optimal glucose estimator and a substantially same interacting multiple model strategy to determine insulin bolus        a user monitor with an input/output interface to receive inputs from the user and to display the suggested insulin bolus        a dispenser, which delivers the amount of medication specified by the control command        
The decision support system may further comprise a dispenser, which based on confirmation by the user delivers the insulin bolus. The insulin bolus may be a prandial insulin bolus or a correction insulin bolus.
The invention further provides processor control code to implement the above-described methods, in particular on a data carrier such as a disk, CD- or DVD-ROM, programmed memory such as read-only memory (Firmware), or on a data carrier such as an optical or electrical signal carrier. Code (and/or data) to implement embodiments of the invention may comprise source, object or executable code in a conventional programming language (interpreted or compiled) such as C, or assembly code, code for setting up or controlling an ASIC (Application Specific Integrated Circuit) or FPGA (Field Programmable Gate Array), or code for a hardware description language such as Verilog (Trade Mark) or VHDL (Very high speed integrated circuit Hardware Description Language). As the skilled person will appreciate such code and/or data may be distributed between a plurality of coupled components in communication with one another.
FIG. 1a shows the key steps in using a multiple model strategy which is used to improve model tracking. The model used is a glucoregulatory model. Overall, N models are defined in a state estimator 20, with each model being a variation of the glucoregulatory model having a different process noise. As explained previously, the process noise represents the random disturbance which is not captured by the other model components and is distinct from the measurement error, which describes the random component of the measurement process. The characteristics of the process noise are usually obtained from retrospective analysis of experimental data. However, the characteristics and specifically the variance of the process noise may be subject to temporal variations. For each model an estimate of the state vector based on glucose measurements and the process noise is calculated in a computationally efficient manner. As an alternative to defining the models to have different process noise, the multiple models defined by the interacting multiple model strategy may differ in certain model constants.
The glucoregulatory may comprise five sub-models, the sub-model of insulin absorption, the sub-model of insulin action, the sub-model of gut absorption, the sub-model of glucose kinetics, and the sub-model of interstitial glucose kinetics. Alternatively, the glucoregulatory model may consist of a sub-set of the models described, e.g. the sub-model of glucose kinetics and the sub-model of interstitial glucose kinetics.
The insulin absorption sub-model is described by a two compartment (two depot) model
                                          ⅆ                                          i                1                            ⁡                              (                t                )                                                          ⅆ            t                          =                                            -                              1                                  t                                      x                    ⁢                                                                                  ⁢                    I                                                                        ⁢                                          i                1                            ⁡                              (                t                )                                              +                                    u              ⁡                              (                t                )                                      60                    +                                                    δ                                  t                  j                                            ⁡                              (                t                )                                      ⁢                          v              ⁡                              (                t                )                                                                        (        1        )                                                      ⅆ                                          i                2                            ⁡                              (                t                )                                                          ⅆ            t                          =                  -                                    1                              t                                  x                  ⁢                                                                          ⁢                  I                                                      ⁡                          [                                                                    i                    2                                    ⁡                                      (                    t                    )                                                  -                                                      i                    1                                    ⁡                                      (                    t                    )                                                              ]                                                          (        2        )                                          i          ⁡                      (            t            )                          =                              1                          t                              x                ⁢                                                                  ⁢                I                                              ⁢                      1000                                          MCR                I                            ⁢              W                                ⁢                                    i              2                        ⁡                          (              t              )                                                          (        3        )            where i1(t) and i2(t) is the amount of insulin in the two subcutaneous insulin depots (U), i(t) is the plasma insulin concentration (mU/l), u(t) denotes insulin infusion (U/h), v(t) denotes insulin boluses given at time tj(U), tmax,I is the time-to-peak of insulin absorption (min), MCRI is the metabolic clearance rate of insulin (L/kg/min), and W is subject's weight (kg).
The insulin action sub-model is described as
                                          ⅆ                                          r                D                            ⁡                              (                t                )                                                          ⅆ            t                          =                              p                          2              ⁢              D                                ⁡                      (                                          i                ⁡                                  (                  t                  )                                            -                                                r                  D                                ⁡                                  (                  t                  )                                                      )                                              (        4        )                                                      ⅆ                                          r                E                            ⁡                              (                t                )                                                          ⅆ            t                          =                              p                          2              ⁢              E                                ⁡                      (                                          i                ⁡                                  (                  t                  )                                            -                                                r                  E                                ⁡                                  (                  t                  )                                                      )                                              (        5        )            where γD and γEGP are the remote insulin actions affecting glucose disposal and endogenous glucose production, respectively, (mU/l), and p2,D and p2,EGP are the fractional disappearance rates associated with the remote insulin actions (/min).
The gut absorption sub-model is described by a two compartment model
                                          ⅆ                                          a                1                            ⁡                              (                t                )                                                          ⅆ            t                          =                                            -                              1                                  t                                      x                    ⁢                                                                                  ⁢                    G                                                                        ⁢                                          a                1                            ⁡                              (                t                )                                              +                                    v              G                        ⁡                          (              t              )                                                          (        6        )                                                      ⅆ                                          a                2                            ⁡                              (                t                )                                                          ⅆ            t                          =                  -                                    1                              t                                  x                  ⁢                                                                          ⁢                  G                                                      ⁡                          [                                                                    a                    2                                    ⁡                                      (                    t                    )                                                  -                                                      a                    1                                    ⁡                                      (                    t                    )                                                              ]                                                          (        7        )                                                      u            A                    ⁡                      (            t            )                          =                              5.551                          Wt                              x                ⁢                                                                  ⁢                G                                              ⁢                                    a              2                        ⁡                          (              t              )                                                          (        8        )            where a1(t) and a2(t) is the amount of glucose in the two absorption compartments (g), uA(t) is the gut absorption rate (mmol/kg/min), vG(t) denotes meal ingestion (g/min), and tmax,G is the time-to-peak of the gut absorption (min).
The glucose kinetics sub-model is described as
                                          ⅆ                                          q                1                            ⁡                              (                t                )                                                          ⅆ            t                          =                                            -                              (                                                                            S                      ID                                        ⁢                                                                  x                        D                                            ⁡                                              (                        t                        )                                                                              +                                      k                    21                                                  )                                      ⁢                                          q                1                            ⁡                              (                t                )                                              +                                    k              12                        ⁢                          q              2                                -                      F            01                    +                      EGP            ⁡                          (              t              )                                +                                    Fu              A                        ⁡                          (              t              )                                +                                    u              S                        ⁡                          (              t              )                                                          (        9        )                                                          ⁢                                            ⅆ                                                q                  2                                ⁡                                  (                  t                  )                                                                    ⅆ              t                                =                                                    +                                  k                  21                                            ⁢                                                q                  1                                ⁡                                  (                  t                  )                                                      -                                          k                12                            ⁢                                                q                  2                                ⁡                                  (                  t                  )                                                                                        (        10        )                                                          ⁢                                            g              P                        ⁡                          (              t              )                                =                                                    q                1                            ⁡                              (                t                )                                                    V              G                                                          (        11        )            where q1(t) and q2(t) are the masses of glucose in the accessible and non-accessible glucose compartments (mmol/kg), k21 and k12 are the fractional transfer rates (/min), F01 is the non-insulin dependent glucose utilisation (mmol/kg/min), EGP(t) is the endogenous glucose production (mmol/kg/min), SI,D is peripheral insulin sensitivity (/min per mU/l), F is glucose bioavailability (unitless), us(t) is unexplained glucose influx (mmol/kg/min), gP(t) is plasma glucose concentration, VG is the glucose distribution volume in the accessible compartment (l/kg).
The EGP is obtained as
                              EGP          ⁡                      (            t            )                          =                              EGP            B                    ⁢                      exp            (                                          -                                  (                                                                                    r                        E                                            ⁡                                              (                        t                        )                                                              -                    BIC                                    )                                            ⁢                                                ln                  ⁡                                      (                    2                    )                                                                    I                                      1                    /                    2                                                                        )                                              (        12        )            where EGPB is the basal endogenous glucose production (mmol/kg/min), BIC is (basal) plasma insulin concentration resulting in plasma glucose concentration of 5.5 mmol/l (mU/l), and I1/2 is an increment in the plasma insulin concentration halving the EGP (mU/l).
The change in unexplained glucose influx us(t) (the process noise) is described by a stochastic differential equationdus(t)=dw(t)  (13)where w(t) is 1-dimensional driving Wiener process.
The basal insulin concentration BIC is calculated from the basal insulin requirement (BIR; U/h) as
                    BIC        =                              1000            60                    ⁢                      BIR                                          MCR                I                            ⁢              W                                                          (        14        )            where MCRI is the metabolic clearance rate of insulin (l/kg/min) and W is subject's weight (kg).
The interstitial glucose kinetics sub-model is described as
                                          ⅆ                                          q                3                            ⁡                              (                t                )                                                          ⅆ            t                          =                  -                                    k              31                        ⁡                          (                                                                    q                    3                                    ⁡                                      (                    t                    )                                                  -                                                      q                    1                                    ⁡                                      (                    t                    )                                                              )                                                          (        15        )                                                      g            IG                    ⁡                      (            t            )                          =                                            q              3                        ⁡                          (              t              )                                            V            G                                              (        16        )            where q3(t) is the mass of glucose in the interstitial fluid (mmol/kg), k3I is the fractional transfer rate (/min), and gIG(t) is interstitial glucose concentration.
As shown in FIG. 1a, a time series of glucose level measurements are inputted from a glucose sensor to the state estimator 20. These measurements may themselves be regarded as estimates for the plasma glucose concentration since they measure interstitial glucose levels. The state estimator 20 applies each model to calculate an estimate for the plasma glucose concentration. These estimates are combined in a modal combiner 22 to generate an optimal glucose estimate.
FIG. 1b shows a variation of the system of FIG. 1a in which the model combiner is replaced by a dose calculator 24. The estimates from the state estimator are inputted to and combined in the dose calculator 24 to generate the optimal glucose estimate. A set-point representing the desired level of plasma glucose is also inputted to the dose calculator. The dose calculator 24 inputs the optimal glucose estimate into a control law to determine the dose to the applied so that a patient has the set-point level of plasma glucose. The calculated dose is the output insulin infusion rate
More details of the strategy are shown in FIG. 2. The first step S100 is to define at time k−1, for each model i, a mode state vector xi,k−1|k−1, a covariance Pi,k−1|k−1 and a mixing probability μi,k−1|k−1. The covariance is a measure of the estimated accuracy of the state estimate. The mixing probability is the probability of each mode state vector being the true state vector and is the weighting attached to each state vector estimate when calculating the final state estimate.
The extended state vector xk which uses all the sub-models defined above includes nine statesxke=(i1,k,i2,k,rD,k,rE,k,a1,k,a2,k,q1,k,q2,k,q3,k,uS,k)T  (17)where i1,k and i2,k is the amount of insulin in the two subcutaneous insulin depots at time k, γD,k and γE,k are the remote insulin actions affecting glucose disposal and endogenous glucose production, a1,k and a2,k are the amount of glucose in the two absorption compartments, q1,k, q2,k, q3,k represent glucose amounts in the accessible, non-accessible, and interstitial compartments and us,k is the unexplained glucose influx (process noise).
The function ƒ is used to calculate the predicted state xk from the previous estimate xk−1 xk=ƒ(xk−1,uk,wk)  (18)                where wk is a 1-dimensional driving Wiener process (see 13)zk=h(xk,vk)  (19)zk is the measurement at time k of the true state xk h is the observation model which maps the true state space into the observed space andvk is the observation noise which is assumed to be zero mean Gaussian white noise with covariance Rk (see also eqn 60 below)        
The state transition for i1,k (i.e. the transition from time k−1 to time k) is defined by the following expressions
                              i                      1            ,            k                          =                              f            10                    +                                    f              11                        ⁢                          i                              1                ,                                  k                  -                  1                                                                                        (        20        )                        where                                                                f          10                =                                                            u                k                            ⁢                              t                                                      x                    ⁢                                                                                  ⁢                    I                                    ,                                      k                    -                    1                                                                        60                    ⁢                      (                          1              -                              ⅇ                                  -                                                            Δ                      ⁢                                                                                          ⁢                                              t                        k                                                                                    t                                                                        x                          ⁢                                                                                                          ⁢                          I                                                ,                                                  k                          -                          1                                                                                                                                          )                                              (        21        )                                          f          11                =                  ⅇ                      -                                          Δ                ⁢                                                                  ⁢                                  t                  k                                                            t                                                      x                    ⁢                                                                                  ⁢                    I                                    ,                                      k                    -                    1                                                                                                          (        22        )            
The state transition for i2,k is defined by the following expressions
                              i                      2            ,            k                          =                              f            20                    +                                    f              21                        ⁢                          i                              1                ,                                  k                  -                  1                                                              +                                    f              22                        ⁢                          i                              2                ,                                  k                  -                  1                                                                                        (        23        )                        where                                                                f          20                =                              f            10                    -                                    f              11                        ⁢                                                            u                  k                                ⁢                Δ                ⁢                                                                  ⁢                                  t                  k                                            60                                                          (        24        )                                          f          21                =                              f            11                    ⁢                                    Δ              ⁢                                                          ⁢              t                                      t                                                x                  ⁢                                                                          ⁢                  I                                ,                                  k                  -                  1                                                                                        (        25        )                                          f          22                =                  f          11                                    (        26        )            
The state transition for rD,k is defined by the following expressions
                              r                      D            ,            k                          =                              f            30                    +                                    f              31                        ⁢                          i                              1                ,                                  k                  -                  1                                                              +                                    f              32                        ⁢                          i                              2                ,                                  k                  -                  1                                                              +                                    f              33                        ⁢                          r                              D                ,                                  k                  -                  1                                                                                        (        27        )                                          f          30                =                  {                                                                                                                50                      ⁢                                              u                        k                                                                                    3                      ⁢                                              MCR                        I                                            ⁢                      W                                                        [                                      1                    -                                                                                            f                          33                                                +                                                                              p                                                          2                              ⁢                              D                                                                                ⁢                                                                                    f                              11                                                        ⁡                                                          (                                                                                                                                    p                                                                          2                                      ⁢                                      D                                                                                                        ⁢                                                                                                            t                                                                                                                        x                                          ⁢                                                                                                                                                                          ⁢                                          I                                                                                ,                                                                                  k                                          -                                          1                                                                                                                                                      ⁡                                                                          (                                                                                                                        Δ                                          ⁢                                                                                                                                                                          ⁢                                                                                      t                                            k                                                                                                                          +                                                                                  t                                                                                                                                    x                                              ⁢                                                                                                                                                                                          ⁢                                              I                                                                                        ,                                                                                          k                                              -                                              1                                                                                                                                                                                                          )                                                                                                                                      -                                                                  Δ                                  ⁢                                                                                                                                          ⁢                                                                      t                                    k                                                                                                  -                                                                  2                                  ⁢                                                                      t                                                                                                                  x                                        ⁢                                                                                                                                                                  ⁢                                        I                                                                            ,                                                                              k                                        -                                        1                                                                                                                                                                                                        )                                                                                                                                                                            (                                                                                                                    p                                                                  2                                  ⁢                                  D                                                                                            ⁢                                                              t                                                                                                      x                                    ⁢                                                                                                                                                  ⁢                                    I                                                                    ,                                                                      k                                    -                                    1                                                                                                                                                        -                            1                                                    )                                                2                                                                              ]                                                                                                  if                    ⁢                                                                                  ⁢                                          p                                              2                        ⁢                        D                                                                              ≠                                      1                                          t                                                                        x                          ⁢                                                                                                          ⁢                          I                                                ,                                                  k                          -                          1                                                                                                                                                                                                                                    50                      ⁢                                              u                        k                                                                                    3                      ⁢                                              MCR                        I                                            ⁢                      W                                                        ⁡                                      [                                          1                      -                                                                        f                          11                                                ⁢                                                                                                            t                                                                                                x                                  ⁢                                                                                                                                          ⁢                                  I                                                                ,                                                                  k                                  -                                  1                                                                                            2                                                        +                                                                                          (                                                                                                      Δ                                    ⁢                                                                                                                                                  ⁢                                    t                                                                    +                                                                      t                                                                                                                  x                                        ⁢                                                                                                                                                                  ⁢                                        I                                                                            ,                                                                              k                                        -                                        1                                                                                                                                                                            )                                                            2                                                                                                            2                            ⁢                                                          t                                                                                                x                                  ⁢                                                                                                                                          ⁢                                  I                                                                ,                                                                  k                                  -                                  1                                                                                            2                                                                                                                                            ]                                                                              otherwise                                                                        (        28        )                                          f          31                =                  {                                                                                                                1000                      ⁢                                              p                                                  2                          ,                          D                                                                                                                                    MCR                        I                                            ⁢                                                                        W                          ⁡                                                      (                                                                                                                            p                                                                      2                                    ⁢                                    D                                                                                                  ⁢                                                                  t                                                                                                            x                                      ⁢                                                                                                                                                          ⁢                                      I                                                                        ,                                                                          k                                      -                                      1                                                                                                                                                                  -                              1                                                        )                                                                          2                                                                              ⁢                                      (                                                                  f                        33                                            +                                                                        f                          11                                                ⁢                                                                                                                                            p                                                                  2                                  ⁢                                  D                                                                                            ⁢                                                              t                                                                                                      x                                    ⁢                                                                                                                                                  ⁢                                    I                                                                    ,                                                                      k                                    -                                    1                                                                                                                              ⁢                              Δ                              ⁢                                                                                                                          ⁢                                                              t                                k                                                                                      -                                                          Δ                              ⁢                                                                                                                          ⁢                                                              t                                k                                                                                      -                                                          t                                                                                                x                                  ⁢                                                                                                                                          ⁢                                  I                                                                ,                                                                  k                                  -                                  1                                                                                                                                                                          t                                                                                          x                                ⁢                                                                                                                                  ⁢                                I                                                            ,                                                              k                                -                                1                                                                                                                                                                          )                                                                                                                    if                    ⁢                                                                                  ⁢                                          p                                              2                        ⁢                        D                                                                              ≠                                      1                                          t                                                                        x                          ⁢                                                                                                          ⁢                          I                                                ,                                                  k                          -                          1                                                                                                                                                                                                              500                    ⁢                    Δ                    ⁢                                                                                  ⁢                                          t                      k                      2                                        ⁢                                          f                      11                                                                                                  MCR                      I                                        ⁢                                          Wt                                                                        x                          ⁢                                                                                                          ⁢                          I                                                ,                                                  k                          -                          1                                                                    3                                                                                                  otherwise                                                                        (        29        )                                          f          32                =                  {                                                                                                                1000                      ⁢                                              p                                                  2                          ⁢                          D                                                                                                                                    MCR                        I                                            ⁢                                              W                        ⁡                                                  (                                                                                                                    p                                                                  2                                  ⁢                                  D                                                                                            ⁢                                                              t                                                                                                      x                                    ⁢                                                                                                                                                  ⁢                                    I                                                                    ,                                                                      k                                    -                                    1                                                                                                                                                        -                            1                                                    )                                                                                                      ⁢                                      (                                                                  f                        11                                            -                                              f                        33                                                              )                                    ⁢                                                                                                                                          if                            ⁢                                                                                                                  ⁢                                                          p                                                              2                                ⁢                                D                                                                                                              ≠                                                      1                                                          t                                                                                                x                                  ⁢                                                                                                                                          ⁢                                  I                                                                ,                                                                  k                                  -                                  1                                                                                                                                                                                                                                                        otherwise                                                                                                                                                                                      1000                    ⁢                    Δ                    ⁢                                                                                  ⁢                                          t                      k                                        ⁢                                          f                      11                                                                                                  MCR                      I                                        ⁢                                          Wt                                                                        x                          ⁢                                                                                                          ⁢                          I                                                ,                                                  k                          -                          1                                                                    2                                                                                                                              (        30        )                                          f          33                =                  ⅇ                                    -                              p                                  2                  ⁢                  D                                                      ⁢            Δ            ⁢                                                  ⁢                          t              k                                                          (        31        )            
The state transition for rE,k is defined by the following expressions
                              r                      E            ,            k                          =                              f            40                    +                                    f              41                        ⁢                          i                              1                ,                                  k                  -                  1                                                              +                                    f              42                        ⁢                          i                              2                ,                                  k                  -                  1                                                              +                                    f              44                        ⁢                          r                              E                ,                                  k                  -                  1                                                                                        (        32        )                                          f          40                =                  {                                                                                                                                                                                              50                            ⁢                                                          u                              k                                                                                                            3                            ⁢                                                          MCR                              I                                                        ⁢                            W                                                                          [                                                  1                          -                                                                                                                    f                                44                                                            +                                                                                                p                                                                                                            2                                      ⁢                                      E                                                                        ,                                                                          k                                      -                                      1                                                                                                                                      ⁢                                                                                                      f                                    11                                                                    ⁡                                                                      (                                                                                                                                                            p                                                                                                                                    2                                              ⁢                                              E                                                                                        ,                                                                                          k                                              -                                              1                                                                                                                                                                      ⁢                                                                                                                              t                                                                                                                                          x                                                ⁢                                                                                                                                                                                                  ⁢                                                I                                                                                            ,                                                                                              k                                                -                                                1                                                                                                                                                                              ⁡                                                                                      (                                                                                                                                          Δ                                                ⁢                                                                                                                                                                                                  ⁢                                                                                                  t                                                  k                                                                                                                                            +                                                                                              t                                                                                                                                                      x                                                    ⁢                                                                                                                                                                                                                  ⁢                                                    I                                                                                                    ,                                                                                                      k                                                    -                                                    1                                                                                                                                                                                                                                        )                                                                                                                                                              -                                                                              Δ                                        ⁢                                                                                                                                                                  ⁢                                                                                  t                                          k                                                                                                                    -                                                                              2                                        ⁢                                                                                  t                                                                                                                                    x                                              ⁢                                                                                                                                                                                          ⁢                                              I                                                                                        ,                                                                                          k                                              -                                              1                                                                                                                                                                                                                                            )                                                                                                                                                                                                                      (                                                                                                                                            p                                                                                                                        2                                          ⁢                                          E                                                                                ,                                                                                  k                                          -                                          1                                                                                                                                                      ⁢                                                                          t                                                                              xI                                        ,                                                                                  k                                          -                                          1                                                                                                                                                                                      -                                  1                                                                )                                                            2                                                                                                      ]                                                                                                                                                                                                      if                            ⁢                                                                                                                  ⁢                                                          p                                                                                                2                                  ⁢                                  E                                                                ,                                                                  k                                  -                                  1                                                                                                                                              ≠                                                      1                                                          t                                                                                                x                                  ⁢                                                                                                                                          ⁢                                  I                                                                ,                                                                  k                                  -                                  1                                                                                                                                                                    ⁢                                                                                                                                                                                                                                                                                                              50                        ⁢                                                  u                          k                                                                                            3                        ⁢                                                  MCR                          I                                                ⁢                        W                                                              ⁡                                          [                                              1                        -                                                                              f                            11                                                    ⁢                                                                                                                    t                                                                                                      x                                    ⁢                                                                                                                                                  ⁢                                    I                                                                    ,                                                                      k                                    -                                    1                                                                                                  2                                                            +                                                                                                (                                                                                                            Δ                                      ⁢                                                                                                                                                          ⁢                                      t                                                                        +                                                                          t                                                                                                                        x                                          ⁢                                                                                                                                                                          ⁢                                          I                                                                                ,                                                                                  k                                          -                                          1                                                                                                                                                                                      )                                                                2                                                                                                                    2                              ⁢                                                              t                                                                                                      x                                    ⁢                                                                                                                                                  ⁢                                    I                                                                    ,                                                                      k                                    -                                    1                                                                                                  2                                                                                                                                                        ]                                                        ⁢                                                                          ⁢                  otherwise                                                                                        (        33        )                                          f          41                =                  {                                                                                                                1000                      ⁢                                              p                                                                              2                            ⁢                            E                                                    ,                                                      k                            -                            1                                                                                                                                                              MCR                        I                                            ⁢                                                                        W                          ⁡                                                      (                                                                                                                            p                                                                                                            2                                      ⁢                                      E                                                                        ,                                                                          k                                      -                                      1                                                                                                                                      ⁢                                                                  t                                                                                                            x                                      ⁢                                                                                                                                                          ⁢                                      I                                                                        ,                                                                          k                                      -                                      1                                                                                                                                                                  -                              1                                                        )                                                                          2                                                                              ⁢                                      (                                                                  f                        44                                            +                                                                        f                          11                                                ⁢                                                                                                                                            p                                                                                                      2                                    ⁢                                    E                                                                    ,                                                                      k                                    -                                    1                                                                                                                              ⁢                                                              t                                                                                                      x                                    ⁢                                                                                                                                                  ⁢                                    I                                                                    ,                                                                      k                                    -                                    1                                                                                                                              ⁢                              Δ                              ⁢                                                                                                                          ⁢                                                              t                                k                                                                                      -                                                          Δ                              ⁢                                                                                                                          ⁢                                                              t                                k                                                                                      -                                                          t                                                                                                x                                  ⁢                                                                                                                                          ⁢                                  I                                                                ,                                                                  k                                  -                                  1                                                                                                                                                                          t                                                          max                              ,                              I                                                                                                                                            )                                                                                                                                            if                    ⁢                                                                                  ⁢                                          p                                                                        2                          ⁢                          E                                                ,                                                  k                          -                          1                                                                                                      ≠                                      1                                          t                                                                        x                          ⁢                                                                                                          ⁢                          I                                                ,                                                  k                          -                          1                                                                                                                                                                                                                                    500                      ⁢                      Δ                      ⁢                                                                                          ⁢                                              t                        k                        2                                            ⁢                                              f                        11                                                                                                            MCR                        I                                            ⁢                                              Wt                                                                              x                            ⁢                                                                                                                  ⁢                            I                                                    ,                                                      k                            -                            1                                                                          3                                                                              ⁢                                                                          ⁢                  otherwise                                                                                        (        34        )                                          f          42                =                  {                                                                                                                1000                      ⁢                                              p                                                                              2                            ⁢                            E                                                    ,                                                      k                            -                            1                                                                                                                                                              MCR                        I                                            ⁢                                              W                        ⁡                                                  (                                                                                                                    p                                                                                                      2                                    ⁢                                    E                                                                    ,                                                                      k                                    -                                    1                                                                                                                              ⁢                                                              t                                                                                                      x                                    ⁢                                                                                                                                                  ⁢                                    I                                                                    ,                                                                      k                                    -                                    1                                                                                                                                                        -                            1                                                    )                                                                                                      ⁢                                      (                                                                  ⅇ                                                  -                                                                                    Δ                              ⁢                                                                                                                          ⁢                                                              t                                k                                                                                                                    t                                                              xI                                ,                                                                  k                                  -                                  1                                                                                                                                                                                        -                                              ⅇ                                                                              -                                                          p                                                                                                2                                  ⁢                                  E                                                                ,                                                                  k                                  -                                  1                                                                                                                                              ⁢                          Δ                          ⁢                                                                                                          ⁢                                                      t                            k                                                                                                                )                                                                                                                                            if                    ⁢                                                                                  ⁢                                          p                                                                        2                          ⁢                          E                                                ,                                                  k                          -                          1                                                                                                      ≠                                      1                                          t                                                                        x                          ⁢                                                                                                          ⁢                          I                                                ,                                                  k                          -                          1                                                                                                                                                                                                                                    1000                      ⁢                      Δ                      ⁢                                                                                          ⁢                                              t                        k                                            ⁢                                              ⅇ                                                  -                                                                                    Δ                              ⁢                                                                                                                          ⁢                                                              t                                k                                                                                                                    t                                                                                                x                                  ⁢                                                                                                                                          ⁢                                  I                                                                ,                                                                  k                                  -                                  1                                                                                                                                                                                                                                                        MCR                        I                                            ⁢                                              Wt                                                                              x                            ⁢                                                                                                                  ⁢                            I                                                    ,                                                      k                            -                            1                                                                          2                                                                              ⁢                                                                          ⁢                  otherwise                                                                                        (        35        )                                          f          44                =                  ⅇ                                    -                              p                                                      2                    ⁢                    E                                    ,                                      k                    -                    1                                                                        ⁢            Δ            ⁢                                                  ⁢                          t              k                                                          (        36        )            
The state transition for a1,k is defined by the following expressions
                                          a                          1              ,              k                                =                                    f              55                        ⁢                          a                              1                ,                                  k                  -                  1                                                                    ⁢                                  ⁢        where                            (        37        )                                          f          55                =                  ⅇ                      -                                          Δ                ⁢                                                                  ⁢                                  t                  k                                                            t                                                      x                    ⁢                                                                                  ⁢                    G                                    ,                                      k                    -                    1                                                                                                          (        38        )            
The state transition for a2,k is defined by the following expressions
                                          a                          2              ,              k                                =                                                    f                65                            ⁢                              a                                  1                  ,                                      k                    -                    1                                                                        +                                          f                66                            ⁢                              a                                  2                  ,                                      k                    -                    1                                                                                      ⁢                                  ⁢        where                            (        39        )                                          f          65                =                              f            55                    ⁢                                    Δ              ⁢                                                          ⁢              t                                      t                                                x                  ⁢                                                                          ⁢                  G                                ,                                  k                  -                  1                                                                                        (        40        )                                          f          66                =                  f          55                                    (        41        )            
The state transitions for q1,k, q2,k, and q3,k are defined by the following expressionsq1,k=ƒ70+ƒ77q1,k−1+ƒ78q2,k−1+ƒ79uS,k−1  (42)q2,k=ƒ80+ƒ87q1,k−1+ƒ88q2,k−1+ƒ89uS,k−1  (43)q3,k=ƒ12,0+ƒ12,7q1,k−1+ƒ12,8q2,k−1+ƒ12,12q3,k−1+ƒ12,9uS,k−1  (44)where coefficients ƒ70, ƒ77, ƒ78, ƒ79, ƒ80, ƒ87, ƒ88, ƒ89, ƒ12,0, ƒ12,7, ƒ12,8, ƒ12,9, and ƒ12,12 can be obtained algebraically as described in Appendix or by numerical approximations.
The state transitions for uS,K is an identity, i.e.uS,k=uS,k−1  (45)
Considering a subset state vector xk, which includes states with associated uncertaintyxk=(q1ƒ,k,g2ƒ,k,uS,k,Fk,q3ƒ,k)T  (46)where q1ƒ,k, q2ƒ,k, and q3ƒ,k represent glucose amounts in the accessible, non-accessible, and interstitial compartments excluding the contribution from meals (more correctly the last meal), us,k is (as before) the unexplained glucose influx (process noise) and Fk is the state transition model which is applied to the previous state xk−1 (see eqn 55).
The total amount of glucose in the compartments is calculated asq1,k=q1ƒ,k+q1m,k  (47)q2,k=q2ƒ,k+q2m,k  (48)q3,k=q3ƒ,k+q3m,k  (49)where q1m,k, q2m,k, and q3m,k represent glucose amounts in the accessible, non-accessible, and interstitial compartments due to the (last) meal.
The glucose masses due to the meal are calculated asq1m,k=Fkƒ7,10  (50)q2m,k=Fkƒ8,10  (51)q3m,k=Fkƒ12,10  (52)
The state transition is obtained asxk=Fk0+Fkxk−1+Gkwk  (53)where
Fk0 is the additive transition model which is independent of the previous state xk−1 and the process noise
                              F          k          0                =                  [                                                                      f                  70                                                                                                      f                  80                                                                                    0                                                                    0                                                                                      f                                      12                    ,                    0                                                                                ]                                    (        54        )            and
Fk is the state transition model which is applied to the previous state xk−1
                              F          k                =                  [                                                                      f                  77                                                                              f                  78                                                                              f                  79                                                            0                                            0                                                                                      f                  87                                                                              f                  88                                                                              f                  89                                                            0                                            0                                                                    0                                            0                                                              f                                      11                    ,                    11                                                                              0                                            0                                                                    0                                            0                                            0                                            1                                            0                                                                                      f                                      12                    ,                    7                                                                                                f                                      12                    ,                    8                                                                                                f                                      12                    ,                    9                                                                              0                                                              f                                      12                    ,                    12                                                                                ]                                    (        55        )            and
Gk is the additive transition model which is applied to the process noise wk
                              G          k                =                  [                                                                                          g                    1                                    ⁢                  Δ                  ⁢                                                                          ⁢                                      t                    k                                                                                                                                            g                    2                                    ⁢                  Δ                  ⁢                                                                          ⁢                                      t                    k                                                                                                                        Δ                  ⁢                                                                          ⁢                                      t                    k                                                                                                      0                                                                                                          g                    5                                    ⁢                  Δ                  ⁢                                                                          ⁢                                      t                    k                                                                                ]                                    (        56        )            and the change in the unexplained glucose influx (process noise) wk is normally distributed, with zero mean and standard deviation σw,k=σw/√{square root over (Δtk)}.
If a glucose measurement is not made in time instance tk, the unexplained glucose influx is regressed towards zero with a half-time m1/2
                                          f                          11              ,              11                                =                      exp            ⁡                          (                                                -                  Δ                                ⁢                                                                  ⁢                                  t                  k                                ⁢                                                      ln                    ⁡                                          (                      2                      )                                                                            m                                          1                      /                      2                                                                                  )                                      ⁢                                  ⁢        otherwise                            (        57        )                                          f                      11            ,            11                          =        1                            (        58        )            
We find that the covariance Qk of the unexplained glucose influx isQk=cov(Gkwk)=σw,k2GkGkT  (59)
At each time interval, a measurement zk of interstitial glucose concentration is made. This measurement is noisy measurement of the plasma glucose. The measurement noise is normally distributed with mean 0 and standard deviation σZ,k zk=Hxk+vk  (60)where
H is the observation model which maps the true state space into the observed spaceH=[000ƒ12,10/VG1/VG]  (61)and
vk is the observation noise which is assumed to be zero mean Gaussian white noise with covariance Rk Rk=E[vkvkT]=[σZ,k2]  (62)
The initial starting position is assumed identical to the first glucose measurement {tilde over (g)}IG,0 and an apriori bioavailability {tilde over (F)}
                                          x            ^                                0            |            0                          =                  [                                                                                                                g                      ~                                                              IG                      ,                      0                                                        ⁢                                      V                    G                                                                                                                                                                  g                      ~                                                              IG                      ,                      0                                                        ⁢                                      V                    G                                    ⁢                                                            k                      21                                                              k                      12                                                                                                                          0                                                                    F                                                                                                                                g                      ~                                                              IG                      ,                      0                                                        ⁢                                      V                    G                                                                                ]                                    (        63        )            
The uncertainty in glucose concentration and bioavailability is expressed in the initial value of the covariance matrix P0|0
                              P                      0            |            0                          =                  [                                                                                          σ                                          Z                      ,                      0                                        2                                    ⁢                                      V                    G                    2                                                                              0                                            0                                            0                                            0                                                                    0                                                                                  σ                                          Z                      ,                      0                                        2                                    ⁢                                      V                    G                    2                                    ⁢                                                            k                      21                      2                                                              k                      12                      2                                                                                                  0                                            0                                            0                                                                    0                                            0                                                              4                  ⁢                                      EGP                    B                    2                                                                              0                                            0                                                                    0                                            0                                            0                                                              σ                  F                  2                                                            0                                                                    0                                            0                                            0                                            0                                                                                  σ                                          Z                      ,                      0                                        2                                    ⁢                                      V                    G                    2                                                                                ]                                    (        64        )            where σF2 is the variance of the apriori distribution of bioavailability F.
A multiple model strategy is used to improve model tracking. Overall, N models are defined, which differ in the standard deviation of the unexplained glucose influx wk σw1,k=σw1/√{square root over (Δtk)}σw2,k=σw2/√{square root over (Δtk)}. . .σwN,k=σwN/√{square root over (Δtk)}  (65)where σw(i−1)<σwi without loss of generality.
The Markov transition probability from mode (or model) i to j is defined as pji, i.e. the probability that the system will switch from model i to model j is pji.
At step S102, there is an optional interact step to obtain for model 0, a mode state vector x, a covariance P and a mixing probability μ at time k−1. For i and j, the mixing probability μj|i,k|k at time k (the weights with which the estimates from the previous cycle k−1 are given to each filter at the beginning of the current cycle k) is defined as
                              μ                                    j              ⁢                                                                i                  ,                                      k                    -                    1                                                                              ⁢              k                        -            1                          =                                            p              ji                        ⁢                          μ                              i                ,                                  k                  -                  1                                                                                        c              _                        j                                              (        66        )            where μi,k is the mode probability, i.e. probability of each model i being the true model, at time k, and cj is a normalisation factor
                                          c            _                    j                =                              ∑            i                    ⁢                                    p              ji                        ⁢                          μ                              i                ,                                  k                  -                  1                                                                                        (        67        )            
The model interaction for mode j proceeds as
                                          x            ^                                              0              ⁢              j                        ,                                          k                -                1                            |                              k                -                1                                                    =                              ∑            i                    ⁢                                                    x                ^                                            j                ,                                                      k                    -                    1                                    |                                      k                    -                    1                                                                        ⁢                          μ                                                j                  ⁢                                                                                i                      ,                                              k                        -                        1                                                                                                  ⁢                  k                                -                1                                                                        (        68        )                                          P                                    0              ⁢              j                        ,                                          k                -                1                            |                              k                -                1                                                    =                              ∑            i                    ⁢                                    [                                                P                                      i                    ,                                                                  k                        -                        1                                            |                                              k                        -                        1                                                                                            +                                                      (                                                                                            x                          ^                                                                          i                          ,                                                                                    k                              -                              1                                                        |                                                          k                              -                              1                                                                                                                          -                                                                        x                          ^                                                                                                      0                            ⁢                            j                                                    ,                                                                                    k                              -                              1                                                        |                                                          k                              -                              1                                                                                                                                            )                                    ⁢                                                            (                                                                                                    x                            ^                                                                                i                            ,                                                                                          k                                -                                1                                                            |                                                              k                                -                                1                                                                                                                                    -                                                                              x                            ^                                                                                                              0                              ⁢                              j                                                        ,                                                                                          k                                -                                1                                                            |                                                              k                                -                                1                                                                                                                                                        )                                        T                                                              ]                        ⁢                          μ                                                j                  ⁢                                                                                i                      ,                                              k                        -                        1                                                                                                  ⁢                  k                                -                1                                                                        (        69        )            
At step S104, there is a predict step to obtain for each model j, an estimate for the mode state vector x, covariance P and mixing probability μ at time k based on the observations, up to and including time k−1. In other words, the predict step uses the state estimate from the previous timestep to produce an estimate of the state at the current timestep.
The predict step for mode j consists of{circumflex over (x)}j,k|k−1=Fk0+Fk{circumflex over (x)}0,j,k−1|k−1  (70)Pj,k|k−1=FkP0,j,k−1|k−1FkT+Qj,k  (71)
At step S106, there is an update step which uses measurement information at the current timestep k to refine for each model j, the estimates for the mode state vector x, covariance P and mixing probability μ for the current timestep obtained from step S104. The resulting estimates should be more accurate estimates for the current timestep.
In case of a glucose measurement {tilde over (g)}IG,k, for each mode j the update consists of evaluating the measurement residual {tilde over (y)}j,k
                                          y            ~                                j            ,            k                          =                                            z              k                        -                          H              ⁢                                                x                  ^                                                  j                  ,                                      k                    |                                          k                      -                      1                                                                                                    =                      [                                                            g                  ~                                                  IG                  ,                  k                                            -                                                                    q                                          j                      ,                                              3                        ⁢                        f                                            ,                                              k                        ❘                                                  k                          -                          1                                                                                                      +                                                            F                                              j                        ,                                                  k                          |                                                      k                            -                            1                                                                                                                ⁢                                          f                                              12                        ,                        10                                                                                                              V                  G                                                      ]                                              (        72        )            then evaluating the residual covariance Sj,k
                                                                        S                                  j                  ,                  k                                            =                            ⁢                                                                    HP                                          j                      ,                                              k                        |                                                  k                          -                          1                                                                                                      ⁢                                      H                    T                                                  +                                  R                  k                                                                                                        =                            ⁢                              [                                                                                                    p                                                  j                          ,                                                      k                            |                                                          k                              -                              1                                                                                ,                          55                                                                    +                                                                        f                                                      12                            ,                            10                                                                          ⁢                                                  p                                                      j                            ,                                                          k                              |                                                              k                                -                                1                                                                                      ,                            45                                                                                              +                                                                        f                                                      12                            ,                            10                                                                          ⁡                                                  (                                                                                    p                                                              j                                ,                                                                  k                                  |                                                                      k                                    -                                    1                                                                                                  ,                                54                                                                                      +                                                                                          f                                                                  12                                  ,                                  10                                                                                            ⁢                                                              p                                                                  j                                  ,                                                                      k                                    |                                                                          k                                      -                                      1                                                                                                        ,                                  44                                                                                                                                              )                                                                                                            V                      G                      2                                                        +                                      σ                                          Z                      ,                      k                                        2                                                  ]                                                                        (        73        )            
The optimal Kalman gain is obtained as
                                                                                          K                                      j                    ,                    k                                                  =                                ⁢                                                      P                                          j                      ,                                              k                        |                                                  k                          -                          1                                                                                                      ⁢                                      H                    T                                    ⁢                                      S                                          j                      ,                      k                                                              -                      1                                                                                                                                              =                                ⁢                                                      P                                          j                      ,                                              k                        |                                                  k                          -                          1                                                                                                      ⁢                                                                                    V                        G                                                                    d                        j                                                              ⁡                                          [                                                                                                    0                                                                                                                                0                                                                                                                                0                                                                                                                                                              f                                                              12                                ,                                10                                                                                                                                                                                          1                                                                                              ]                                                                                                                                              =                                ⁢                                                                            V                      G                                                              d                      j                                                        ⁡                                      [                                                                                                                                                      p                                                              j                                ,                                                                  k                                  |                                                                      k                                    -                                    1                                                                                                  ,                                15                                                                                      +                                                                                          f                                                                  12                                  ,                                  10                                                                                            ⁢                                                              p                                                                  j                                  ,                                                                      k                                    |                                                                          k                                      -                                      1                                                                                                        ,                                  14                                                                                                                                                                                                                                                                                                    p                                                              j                                ,                                                                  k                                  |                                                                      k                                    -                                    1                                                                                                  ,                                25                                                                                      +                                                                                          f                                                                  12                                  ,                                  10                                                                                            ⁢                                                              p                                                                  j                                  ,                                                                      k                                    |                                                                          k                                      -                                      1                                                                                                        ,                                  24                                                                                                                                                                                                                                                                                                    p                                                              j                                ,                                                                  k                                  |                                                                      k                                    -                                    1                                                                                                  ,                                35                                                                                      +                                                                                          f                                                                  12                                  ,                                  10                                                                                            ⁢                                                              p                                                                  j                                  ,                                                                      k                                    |                                                                          k                                      -                                      1                                                                                                        ,                                  34                                                                                                                                                                                                                                                                                                    p                                                              j                                ,                                                                  k                                  |                                                                      k                                    -                                    1                                                                                                  ,                                45                                                                                      +                                                                                          f                                                                  12                                  ,                                  10                                                                                            ⁢                                                              p                                                                  j                                  ,                                                                      k                                    |                                                                          k                                      -                                      1                                                                                                        ,                                  44                                                                                                                                                                                                                                                                                                    p                                                              j                                ,                                                                  k                                  |                                                                      k                                    -                                    1                                                                                                  ,                                55                                                                                      +                                                                                          f                                                                  12                                  ,                                  10                                                                                            ⁢                                                              p                                                                  j                                  ,                                                                      k                                    |                                                                          k                                      -                                      1                                                                                                        ,                                  54                                                                                                                                                                                                          ]                                                                                      ⁢                                  ⁢        where                            (        74        )                                          d          j                =                              p                          j              ,                              k                |                                  k                  -                  1                                            ,              55                                +                                    f                              12                ,                10                                      ⁢                          p                              j                ,                                  k                  |                                      k                    -                    1                                                  ,                45                                              +                                    f                              12                ,                10                                      ⁡                          (                                                p                                      j                    ,                                          k                      |                                              k                        -                        1                                                              ,                    54                                                  +                                                      f                                          12                      ,                      10                                                        ⁢                                      p                                          j                      ,                                              k                        |                                                  k                          -                          1                                                                    ,                      44                                                                                  )                                +                                    σ                              Z                ,                k                            2                        ⁢                          V              G              2                                                          (        75        )            
The updated state estimate is obtained as
                                                                                          x                  ^                                                  j                  ,                                      k                    ❘                    k                                                              =                            ⁢                                                                    x                    ^                                                        j                    ,                                          k                      ❘                                              k                        -                        1                                                                                            +                                                      K                                          j                      ,                      k                                                        ⁢                                                            y                      ~                                                              j                      ,                      k                                                                                                                                              =                            ⁢                                                                    x                    ^                                                        j                    ,                                          k                      ❘                                              k                        -                        1                                                                                            +                                                                                                      ⁢                                                                                                                                            g                          ~                                                                          IG                          ,                          k                                                                    ⁢                                              V                        G                                                              -                                          q                                              j                        ,                                                  3                          ⁢                          f                                                ,                                                  k                          ❘                                                      k                            -                            1                                                                                                                -                                                                  F                                                  j                          ,                                                      k                            ❘                                                          k                              -                              1                                                                                                                          ⁢                                              f                                                  12                          ,                          10                                                                                                                          d                    j                                                  ⁡                                  [                                                                                                                                          p                                                          j                              ,                                                              k                                ❘                                                                  k                                  -                                  1                                                                                            ,                              15                                                                                +                                                                                    f                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                14                                                                                                                                                                                                                                                                              p                                                          j                              ,                                                              k                                ❘                                                                  k                                  -                                  1                                                                                            ,                              25                                                                                +                                                                                    f                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                24                                                                                                                                                                                                                                                                              p                                                          j                              ,                                                              k                                ❘                                                                  k                                  -                                  1                                                                                            ,                              35                                                                                +                                                                                    f                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                34                                                                                                                                                                                                                                                                              p                                                          j                              ,                                                              k                                ❘                                                                  k                                  -                                  1                                                                                            ,                              45                                                                                +                                                                                    f                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                44                                                                                                                                                                                                                                                                              p                                                          j                              ,                                                              k                                ❘                                                                  k                                  -                                  1                                                                                            ,                              55                                                                                +                                                                                    f                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                54                                                                                                                                                                                          ]                                                                                        (        76        )            
The updated estimate covariance for the optimal Kalman gain is obtained as
                              P                      j            ,                          k              ❘              k                                      =                ⁢                                            (                              I                -                                                      K                                          j                      ,                      k                                                        ⁢                  H                                            )                        ⁢                          P                              j                ,                                  k                  ❘                                      k                    -                    1                                                                                =                                    (        77        )                                          [                                                    1                                            0                                            0                                                                                  -                                          f                                              12                        ,                        10                                                                              ⁢                                                                                                                                                                        p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                15                                                                                      +                                                                                                                                                                                                          k                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ⁢                                                                                                                                                                                        k                                        -                                        1                                                                            ,                                      14                                                                                                                                                                                                                                                                                                      d                      j                                                                                                                    -                                                                                                                                                                        p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                15                                                                                      +                                                                                                                                                                                                          f                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ⁢                                                                                                                                                                                        k                                        -                                        1                                                                            ,                                      14                                                                                                                                                                                                                                                                                                      d                      j                                                                                                                          0                                            1                                            0                                                                                  -                                          f                                              12                        ,                        10                                                                              ⁢                                                                                                                                                                        p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                25                                                                                      +                                                                                                                                                                                                          k                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ⁢                                                                                                                                                                                        k                                        -                                        1                                                                            ,                                      24                                                                                                                                                                                                                                                                                                      d                      j                                                                                                                    -                                                                                                                                                                        p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                25                                                                                      +                                                                                                                                                                                                          f                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ⁢                                                                                                                                                                                        k                                        -                                        1                                                                            ,                                      24                                                                                                                                                                                                                                                                                                      d                      j                                                                                                                          0                                            0                                            1                                                                                  -                                          f                                              12                        ,                        10                                                                              ⁢                                                                                                                                                                        p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                35                                                                                      +                                                                                                                                                                                                          k                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                34                                                                                                                                                                                                d                      j                                                                                                                    -                                                                                                                                                                        p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                25                                                                                      +                                                                                                                                                                                                          f                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                34                                                                                                                                                                                                d                      j                                                                                                                          0                                            0                                            0                                                              1                  -                                                            f                                              12                        ,                        10                                                              ⁢                                                                                                                                                                                      p                                                                  j                                  ,                                                                      k                                    ❘                                                                          k                                      -                                      1                                                                                                        ,                                  45                                                                                            +                                                                                                                                                                                                                          k                                                                  12                                  ,                                  10                                                                                            ⁢                                                              p                                                                  j                                  ,                                                                      k                                    ❘                                                                          k                                      -                                      1                                                                                                        ,                                  44                                                                                                                                                                                                                d                        j                                                                                                                                          -                                                                                                                                                                        p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                45                                                                                      +                                                                                                                                                                                                          f                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                44                                                                                                                                                                                                d                      j                                                                                                                          0                                            0                                            0                                                                                  -                                          f                                              12                        ,                        10                                                                              ⁢                                                                                                                                                                        p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                55                                                                                      +                                                                                                                                                                                                          k                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                54                                                                                                                                                                                                d                      j                                                                                                                    1                  -                                                                                                                                                                        p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                55                                                                                      +                                                                                                                                                                                                          f                                                              12                                ,                                10                                                                                      ⁢                                                          p                                                              j                                ,                                                                  k                                  ❘                                                                      k                                    -                                    1                                                                                                  ,                                54                                                                                                                                                                                                d                      j                                                                                                    ]                ⁢                  P                      j            ,                          k              ❘                              k                -                1                                                                                    
Alternatively, if Kj,k is not the optimal Kalman gain, the updated estimate covariance is obtained asPj,k|k=(I−Kj,kH)Pj,k|k−1(I−Kj,kH)T+Kj,kRkKj,kT  (78)
The likelihood function Λj,k of mode j is obtained as
                              Λ                      j            ,            k                          =                                            V              G                                                      2                ⁢                π                ⁢                                                                  ⁢                                  d                  j                                                              ⁢                      exp            ⁡                          (                              -                                                                  ⁢                                                                                                    y                        ~                                                                    j                        ,                        k                                                              ⁢                                          V                      G                      2                                                                            2                    ⁢                                                                                  ⁢                                          d                      j                                                                                  )                                                          (        79        )            and the mode probability as
                              μ                      j            ,            k                          =                              1            c                    ⁢                      Λ                          j              ,              k                                ⁢                                    c              _                        j                                              (        80        )            
Finally at step S108, there is a combine step whereby the estimated states and covariances for each model are combined to prove overall state and covariance estimates. The overall estimated state vector is obtained from a summation of all estimated state vectors multiplied by their weighting or mixing probability. Similarly, the estimated covariance is derived from a summation of all estimated covariances taking into account the relevant mixing probabilities.
                                          x            ^                                k            ❘            k                          =                              ∑            j                                                          ⁢                                          ⁢                                                    x                ^                                            j                ,                                  k                  ❘                  k                                                      ⁢                          μ                              j                ,                k                                                                        (        81        )                                          P                                    k              -              1                        ❘                          k              -              1                                      =                              ∑            j                                                          ⁢                                    [                                                P                                      j                    ,                                          k                      ❘                      k                                                                      +                                                      (                                                                                            x                          ^                                                                          j                          ,                                                      k                            ❘                            k                                                                                              -                                                                        x                          ^                                                                          k                          ❘                          k                                                                                      )                                    ⁢                                                            (                                                                                                    x                            ^                                                                                j                            ,                                                          k                              ❘                              k                                                                                                      -                                                                              x                            ^                                                                                k                            ❘                            k                                                                                              )                                        T                                                              ]                        ⁢                          μ                              j                ,                k                                                                        (        82        )            
Referring to FIG. 1b, the control law used by the dose calculator to determine the correct dose is defined as
                    J        =                                            ∑                              j                =                                  N                  1                                                            N                2                                      ⁢                                                  ⁢                                          [                                                                            y                      ^                                                                                      t                        +                        j                                            ❘                      t                                                        -                                      w                                          t                      +                      j                                                                      ]                            2                                +                      λ            ⁢                                          ∑                                  j                  =                  1                                                                      N                    2                                    -                  d                                            ⁢                                                          ⁢                                                [                                      Δ                    ⁢                                                                                  ⁢                                          μ                                              t                        +                        j                        -                        1                                                                              ]                                2                                                                        (        83        )            where ŷt+j|t is plasma glucose concentration obtained using the combined step defined by Eq. (81) and interstitial glucose measurements taken up to time t, andΔuj=uj−uj−1  (84)
The extended input vector u+ is defined asu+=(vtu)T  (85)where vi denotes insulin bolus given at time i andu is insulin infusion with the first element of u, u1, defining the insulin infusion rate to be delivered.
Thus the control law in matrix notation isJ=J1+J2=∥A(u+−ur+)+yr−w∥+∥Λ(u−u−1)∥  (86)where w is the set point (i.e. desired glucose level), ur is the operating point, yr is the output associated with the operating point, and A represents the model given by Eqs. (1)-(11) linearised around the operating point
                              a          ij                =                              1                          V              G                                ⁢                                    dq                              1                ,                j                                                    du              i              +                                                          (        87        )            with the matrix Λ defined as
                    Λ        =                  (                                                                      λ                                      t                    +                    1                                                                              0                                            …                                            …                                            0                                                                    0                                                              λ                                      t                    +                    2                                                                                                                                                                                                                                          ⋮                                                                    ⋮                                                                                                                          ⋱                                                                                                                          ⋮                                                                    ⋮                                                                                                                                                                                                                          λ                                      t                    +                    N                    -                    1                                                                              0                                                                    0                                            …                                            …                                            0                                                              λ                                      t                    +                    N                                                                                )                                    (        88        )            
The two components of the control law J1 and J2 and their partial derivatives with respect to u+ can be written as
                              J          1                =                                            u                              +                T                                      ⁢                          A              T                        ⁢                          Au              +                        ⁢                          2              ⁡                              [                                                                            (                                                                        y                          r                                                -                        w                                            )                                        T                                    -                                                            u                      r                                              +                        T                                                              ⁢                                          A                      T                                                                      ]                                      ⁢            Au                    +                                    [                                                                    u                    r                                          +                      T                                                        ⁢                                      A                    T                                                  -                                  2                  ⁢                                                            (                                                                        y                          r                                                -                        w                                            )                                        T                                                              ]                        ⁢                          Au              r              +                                -                      2            ⁢                          w              T                        ⁢                          y              r                                +                                    y              r              T                        ⁢                          y              r                                +                                    w              T                        ⁢            w                                              (        89        )                                          J          2                =                                            (                              u                -                                  u                                      -                    1                                                              )                        T                    ⁢                      Λ            T                    ⁢                      Λ            ⁡                          (                              u                -                                  u                                      -                    1                                                              )                                                          (        90        )                                                      dJ            1                                du            +                          =                              2            ⁢                          A              T                        ⁢                          Au              +                                +                      2            ⁢                                          A                T                            ⁡                              (                                                      y                    r                                    -                  w                  -                                      Au                    r                    +                                                  )                                                                        (        91        )                                                      dJ            2                                du            +                          =                  2          ⁢                      (                                                            B                  T                                ⁢                                  Bu                  +                                            +              b                        )                    ⁢                                          ⁢          with                                    (        92        )                                B        =                  (                                                    0                                            0                                            …                                            …                                            …                                            0                                                                    0                                                              -                                      λ                                          t                      +                      1                                                                                                  0                                                                                                                                                                                                        ⋮                                                                    0                                                              λ                                      t                    +                    2                                                                                                -                                      λ                                          t                      +                      2                                                                                                  0                                                                                                                          ⋮                                                                    ⋮                                            0                                                                                                                          ⋱                                                                                                                          0                                                                    0                                                                                                                          0                                                              λ                                      t                    +                    N                    -                    1                                                                                                -                                      λ                                          t                      +                      N                      -                      1                                                                                                  0                                                                    0                                            …                                            …                                            0                                                              λ                                      t                    +                    N                                                                                                -                                      λ                                          t                      +                      N                                                                                                    )                                    (        93        )                                                                    B              T                        ⁢            B                    =                      (                                                            0                                                  0                                                  0                                                  …                                                  ⋯                                                  0                                                                              0                                                                                            λ                                              t                        +                        1                                            2                                        +                                          λ                                              t                        +                        2                                            2                                                                                                            -                                          λ                                              t                        +                        2                                            2                                                                                        0                                                                                                                                          ⋮                                                                              0                                                                      -                                          λ                                              t                        +                        2                                            2                                                                                                                                  λ                                              t                        +                        2                                            2                                        +                                          λ                                              t                        +                        3                                            2                                                                                                            -                                          λ                                              t                        +                        3                                            2                                                                                                                                                                                ⋮                                                                              ⋮                                                  0                                                                                                                                          ⋱                                                                                                                                          0                                                                              0                                                                                                                                          0                                                                      -                                          λ                                              t                        +                        N                        -                        2                                            2                                                                                                                                  λ                                              t                        +                        N                        -                        2                                            2                                        +                                          λ                                              t                        +                        N                        -                        1                                            2                                                                                                            -                                          λ                                              t                        +                        N                                            2                                                                                                                    0                                                  …                                                  …                                                  0                                                                      -                                          λ                                              t                        +                        N                        -                        1                                            2                                                                                                                                  λ                                              t                        +                        N                        -                        1                                            2                                        +                                          λ                                              t                        +                        N                                            2                                                                                            )                          ⁢                                  ⁢        and                            (        94        )                                b        ⁢                                  =                  (                                                    0                                                                                  -                                          λ                                              t                        +                        1                                            2                                                        ⁢                                      u                    t                                                                              0                                            …                                                                                  0                    )                                    T                                                                                        (        95        )            
The derivative of J with respect to u+ is then obtained as
                                                        dJ                              du                +                                      =                                          2                ⁢                                  (                                                            Cu                      +                                        +                    c                                    )                                            =              0                                ⁢                                          ⁢          where                ⁢                                                      (        96        )                                C        =                                            A              T                        ⁢            A                    +                                    B              T                        ⁢            B                                              (        97        )                                c        =                                            A              T                        ⁡                          (                                                y                  r                                -                w                -                                  Au                  r                  +                                            )                                +          b                                    (        98        )            
The solution is found asu+=−C−1c  (99)
FIG. 3 is a schematic showing apparatus implementing the method of controlling levels of glucose described above. The apparatus comprises at least one continuous glucose monitor 30 which measures the glucose concentration in a patient 32 at regular time intervals which may be every minute, every hour or another user defined interval. The glucose monitor may measure glucose levels intravenously, subcutaneously and/or intradermally. The measured glucose levels provide an initial estimate of the patient's inferred glucose level, e.g. plasma glucose concentration.
The measured glucose levels are input to a processor 34 which calculates a refined estimate of glucose level using the interacting multiple model strategy. The processor 34 uses the refined estimated to calculate a dose to be applied to the patient. The processor 34 is connected to an insulin pump 36 and delivers a control command to the insulin pump 36 in apply the calculated insulin infusion rate to the patient.
The apparatus also comprises an optional user monitor 38 which is connected to the processor 34. The user monitor 38 has an input interface to receive inputs from the user such as meal intake, exercise, etc. This information is input to the processor 34 to use when calculating the refined glucose estimate and dose. The user monitor 38 also receives system status information from the processor and has an output interface to display such information to the patient.
No doubt many effective alternatives will occur to the skilled person. It will be understood that the invention is not limited to the described embodiments and encompasses modifications apparent to those skilled in the art lying within the spirit and scope of the claims appended hereto.